package com.ruoyi.project.lesson.lesson.domain;

import com.ruoyi.common.utils.MoneyUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;
import java.util.List;

/**
 * 课程对象 lesson
 *
 * @author shixiangwen
 * @date 2020-12-07
 */
public class Lesson extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 课程ID
     */
    private Long id;

    /**
     * 课程名称
     */
    @Excel(name = "课程名称")
    private String name;

    /**
     * 课程介绍
     */
    @Excel(name = "课程介绍")
    private String intro;

    /**
     * null
     */
    @Excel(name = "null")
    private Long fee;

    /**
     * null
     */
    @Excel(name = "null")
    private Long discountFee;

    /**
     * 报名开始
     */
    @Excel(name = "报名开始", width = 30, dateFormat = "yyyy-MM-dd")
    private Date regStartTime;

    /**
     * 报名结束
     */
    @Excel(name = "报名结束", width = 30, dateFormat = "yyyy-MM-dd")
    private Date regEndTime;

    /**
     * 自动上架时间
     */
    @Excel(name = "自动上架时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date autoDeployTime;

    /**
     * 自动下架时间
     */
    @Excel(name = "自动下架时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date autoUndeployTime;

    /**
     * 常规标签
     */
    @Excel(name = "常规标签")
    private String normalTags;

    /**
     * 红火标签
     */
    @Excel(name = "红火标签")
    private String hotTags;

    /**
     * 限购名额
     */
    @Excel(name = "限购名额")
    private Long capacity;

    /**
     * 是否首页显示
     */
    @Excel(name = "是否首页显示")
    private Integer showMain;

    @Excel(name = "是否首页推荐")
    private Integer recomMain;


    /**
     * 分类标签
     */
    @Excel(name = "分类标签")
    private String tags;

    /**
     * 创建时间
     */
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;

    /**
     * 状态
     */
    @Excel(name = "状态")
    private Long status;

    /**
     * 所属板块
     */
    @Excel(name = "所属板块")
    private String blocks;

    /**
     * 所属板块
     */
    private Long[] blockIds;

    /**
     * 所属类型
     */
    private Long[] tagIds;

    private List<String> blockNames;

    private List<String> tagNames;

    /**
     * 课程类型
     */
    @Excel(name = "课程类型")
    private Long type;

    /**
     * 渠道
     */
    @Excel(name = "渠道")
    private String channel;

    /**
     * 发放形式
     */
    @Excel(name = "发放形式")
    private String provideMethods;

    private Long[] provideMethodIds;

    private Integer weight;

    //是否显示原价
    private Integer showOriginalPrice;

    /**
     * 是否测试课
     */
    private Integer test;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public String getIntro() {
        return intro;
    }

    public void setFee(Long fee) {
        this.fee = fee;
    }

    public Long getFee() {
        return fee;
    }

    public void setDiscountFee(Long discountFee) {
        this.discountFee = discountFee;
    }

    public Long getDiscountFee() {
        return discountFee;
    }

    public void setRegStartTime(Date regStartTime) {
        this.regStartTime = regStartTime;
    }

    public Date getRegStartTime() {
        return regStartTime;
    }

    public void setRegEndTime(Date regEndTime) {
        this.regEndTime = regEndTime;
    }

    public Date getRegEndTime() {
        return regEndTime;
    }

    public void setAutoDeployTime(Date autoDeployTime) {
        this.autoDeployTime = autoDeployTime;
    }

    public Date getAutoDeployTime() {
        return autoDeployTime;
    }

    public void setAutoUndeployTime(Date autoUndeployTime) {
        this.autoUndeployTime = autoUndeployTime;
    }

    public Date getAutoUndeployTime() {
        return autoUndeployTime;
    }

    public void setNormalTags(String normalTags) {
        this.normalTags = normalTags;
    }

    public String getNormalTags() {
        return normalTags;
    }

    public void setHotTags(String hotTags) {
        this.hotTags = hotTags;
    }

    public String getHotTags() {
        return hotTags;
    }

    public void setCapacity(Long capacity) {
        this.capacity = capacity;
    }

    public Long getCapacity() {
        return capacity;
    }

    public void setShowMain(Integer showMain) {
        this.showMain = showMain;
    }

    public Integer getShowMain() {
        return showMain;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public String getTags() {
        return tags;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setStatus(Long status) {
        this.status = status;
    }

    public Long getStatus() {
        return status;
    }

    public void setBlocks(String blocks) {
        this.blocks = blocks;
    }

    public String getBlocks() {
        return blocks;
    }

    public Long[] getBlockIds() {
        return blockIds;
    }

    public void setBlockIds(Long[] blockIds) {
        this.blockIds = blockIds;
    }

    public Long[] getTagIds() {
        return tagIds;
    }

    public void setTagIds(Long[] tagIds) {
        this.tagIds = tagIds;
    }

    public String getYuan() {
        return MoneyUtil.fee2yuan(fee).toString();
    }

    public String getDiscountYuan() {
        return MoneyUtil.fee2yuan(discountFee).toString();
    }

    public List<String> getBlockNames() {
        return blockNames;
    }

    public void setBlockNames(List<String> blockNames) {
        this.blockNames = blockNames;
    }

    public List<String> getTagNames() {
        return tagNames;
    }

    public void setTagNames(List<String> tagNames) {
        this.tagNames = tagNames;
    }

    public Long getType() {
        return type;
    }

    public void setType(Long type) {
        this.type = type;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getProvideMethods() {
        return provideMethods;
    }

    public void setProvideMethods(String provideMethods) {
        this.provideMethods = provideMethods;
    }

    public Integer getTest() {
        return test;
    }

    public void setTest(Integer test) {
        this.test = test;
    }

    public Integer getWeight() {
        return weight;
    }

    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    public Long[] getProvideMethodIds() {
        return provideMethodIds;
    }

    public void setProvideMethodIds(Long[] provideMethodIds) {
        this.provideMethodIds = provideMethodIds;
    }

    public Integer getShowOriginalPrice() {
        return showOriginalPrice;
    }

    public void setShowOriginalPrice(Integer showOriginalPrice) {
        this.showOriginalPrice = showOriginalPrice;
    }

    public Integer getRecomMain() {
        return recomMain;
    }

    public void setRecomMain(Integer recomMain) {
        this.recomMain = recomMain;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("name", getName())
                .append("intro", getIntro())
                .append("fee", getFee())
                .append("discountFee", getDiscountFee())
                .append("regStartTime", getRegStartTime())
                .append("regEndTime", getRegEndTime())
                .append("autoDeployTime", getAutoDeployTime())
                .append("autoUndeployTime", getAutoUndeployTime())
                .append("normalTags", getNormalTags())
                .append("hotTags", getHotTags())
                .append("capacity", getCapacity())
                .append("showMain", getShowMain())
                .append("tags", getTags())
                .append("remark", getRemark())
                .append("createdTime", getCreatedTime())
                .append("status", getStatus())
                .append("blocks", getBlocks())
                .toString();
    }
}
